import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import('@/views/Home.vue')
    },
    {
        path: '/demo/index',
        name: 'Index',
        meta: { title: 'tabs' },
        component: () => import('@/views/demo/Index.vue')
    },
    {
        path: '/demo/center',
        name: 'Center',
        meta: { title: '盒子垂直居中' },
        component: () => import('@/views/demo/Center.vue')
    },
    {
        path: '/demo/table',
        name: 'Table',
        meta: { title: '表格' },
        component: () => import('@/views/table')
    },
    {
        path: '/demo/tab',
        name: 'Tab',
        meta: { title: 'tabs' },
        component: () => import('@/views/demo/Tab.vue')
    },
    {
        path: '/demo/template',
        name: 'template',
        meta: { title: '模板编辑' },
        component: () => import('@/views/template')
    },
    {
        path: '/demo/virtual-list',
        name: 'VirtualList',
        meta: { title: '虚拟列表' },
        component: () => import('@/views/virtual-list')
    },
];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
});

export default router;
